

<script>
import BaseDataBox from '../common/BaseDataBox';
import { reqPost } from 'global/axios';

export default {
  extends: BaseDataBox,

  data() {
    return {
      title: '本月巡查次数',
      icon: 'eye',
      value: '',
    };
  },

  async mounted() {
    let myMonth = new Date().format('yyyy-MM');
    let { status, result } = await reqPost({
      data: {
        basis: 5,
        patrol_is: '已结束',
        start_time: `${myMonth}-01 00:00:00|#|${myMonth}-31 23:59:59`,
      },
      url: '/emergency/patrol/count',
    });
    status && (this.value = result);
  },

  methods: {
    click() {
      this.$router.push('/home/chief-patrol');
    },
  },
};
</script>

<style>
</style>